<?php
use yii\helpers\Html;
use yii\widgets\LinkPager;
use yii\helpers\Url;
$this->title = '我的问答';
?>
<link rel="stylesheet" href="/static/css/mzq.css" />
<?php echo $this->render('_centerHeader') ?>
<!--主体开始-->
<div class="main-area" style=" background: #f5f5f5;">
    <div class="container">
        <div class="column-layout">
            <!-- main-area-left start  -->
            <div class="column-col column-full main-area-left">


<!-- 问答 -->
<div id="WD" class="main-area-leftin tab-box" style="padding:0;">
<div class="ibox">
<div class="ibox-in" style="max-width: 832px;">
<div class="ibox-head" style="position: relative;">
<ul class="tab-list" role="tablist">
<li role="presentation">
<a href="<?= Url::to(['center/answer'])?>"><span>我的回答 <?php echo $pagination->totalCount;?></span></a>

</li>


<li role="presentation" class="active">
<a href="<?= Url::to(['center/question'])?>"><span>
		我的提问 <?php echo $paginations->totalCount;?></span></a>
</li>
<li role="presentation">
<a href="<?= Url::to(['center/answercollect'])?>"><span>
		我的收藏 <?php echo $paginationss->totalCount;?></span></a>
</li>
</ul>

<a class="btn zynnb" target="_blank" href="<?= Url::to(['questions/release'])?>">发布问题</a>

</div>
<div class="ibox-body tab-pane-list">
<!-- 我的提问  -->

<div role="tabpanel" class="tab-pane" style="display: block;" id="MY_QA">
<div class="my-qa-list QA-list">
	<?php 
	if($result != ''){
	foreach($result as $k=>$v){?>
	
	<!-- item  -->
	<div class="item">
		<div class="col-left">
			<div class="col-in">
				<div class="u-photo-box">
					<a href="#" target="_blank" id="40296" class="u-photo u-photo-btn">
						<img src="<?php echo 'http://files.bwphp.com/file/image/show/50/50?path='.$v['user_thumb']?>" alt="" height="50" width="50">
					</a>
					
				</div>
				<span class="u-name"><?php echo $v['user_name']?></span>
				
			</div>
		</div>

		<div class="col-right">
			<div class="col-in item-r-main">

				<h3 style="max-width: 603px;">
					<a href="<?= Url::to(['questions/details'])?>?ques_id=<?php echo $v['ques_id']?>" target="_blank"><?php echo $v['ques_name']?></a>
				</h3>
<?php if($v['answer_content']!='当前问题还没有人回答'){?>
				<div class="item-new-answer">
						<?php if($v['answer_best'] == 1){?>
						<span class="tips">[最佳回答]</span>
						<?php }else{?>
						<span class="tips">[最新回答]</span>
						<?php }?>
						<div style="max-width: 603px;"><?php echo $v['answer_content']?></div>
					
				</div>
				<?php }else{?>
				<div class="item-new-answer">
						<span class="tips"></span>
						<div style="max-width: 603px;"><?php echo $v['answer_content']?></div>
					
				</div>
				<?php }?>
				<div class="hot-tag-box">
					
						<?php foreach($v['label'] as $kk=>$vv){?>
							<!-- <a href="http://www.bwphp.com/group/ask/?tag=%E7%89%A9%E8%81%94%E7%BD%91" class="hot-tag">物联网</a>
													
							<a href="http://www.bwphp.com/group/ask/?tag=%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86" class="hot-tag">产品经理</a>
													
							<a href="http://www.bwphp.com/group/ask/?tag=%E5%85%B6%E4%BB%96" class="hot-tag">其他</a> -->
							<a href="#" class="hot-tag"><?php echo $vv?></a>
						<?php }?>
					
					
				</div>
				
				<div class="column-layout item-foot">
					<div class="column-col-ml"><?php echo date('Y-m-d H:i:s',$v['ques_addtime'])?></div>
					<div class="column-col-mr"><span class="i-item"><a target="_blank" href="#">
						
						回答 <?php echo $v['ques_answersum']?></a></span>
						
					</div>
				</div>
			</div>
		</div>
	
	</div>
	<?php }?>
	<?php }else{ echo "<h1><center>你没有发布过任何问题</center></h1>";}?>

</div>
	<?php echo LinkPager::widget([
				'pagination' => $paginations,
				'prevPageLabel'=>'上一页',
				'nextPageLabel'=>'下一页',
			]);?>
<!-- 我的回复  -->

<!-- 翻页  -->

</div>
</div>
</div>
</div>
</div>
</div>
            <!-- main-area-left end  -->
            <!-- main-area-right start  -->
            <div dy-v="00-00-11-11" class="column-col main-area-right">
                
                <!-- 课程推荐 -->
                <?php echo $this->render('../common/_courseRecommend') ?>
 
                <!-- 名师推荐 -->
                <?php echo $this->render('../common/_teacherRecommend') ?>

                <!-- 图片广告 -->
                <?php echo  $this->render('../common/_adRecommend') ?>
            </div>
            <!-- main-area-right end  -->
        </div>
    </div>
</div>
